<?php include PATH_VIEWS . 'common/header.php'; ?>
<div class="main">
    <?php include PATH_VIEWS . 'common/left.php'; ?>
    <div class="main_right welcome_right" id="slide">
        <dl>
            <dt><h3>操作说明 <span>[关闭/展开]</span></h3></dt>
            <dd class="border">
                <span>以下红色边框的表单是必填项 。</span>
            </dd>
        </dl>
        <dl>
            <dt class="bottom">
            <h4>添加新闻</h4>
            </dt>
            <dd>
                <form id="form1" name="form1" method="post" enctype="multipart/form-data" action="<?php echo URL; ?>">
                    <table class="system_envir from_demo"> 
                        <tr>
                            <td>选择分类</td>
                            <td>
                                <select name="Fcategory">
                                    <?php foreach ($catagory as $key => $ls) { ?>                                   
                                        <option value="<?php echo $key ?>"><?php echo $ls ?></option>
                                    <?php } ?>
                                </select>
                            </td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>文章标题</td>
                            <td class="email"><input type="text" name="Ftitle" value="" maxlength="32" data-rule="文章标题:required;length[4~32]" data-target="#tishi"/></td>
                            <td id="tishi">新闻标题在4~32个字符之间不能有特殊字符</td>
                        </tr>
                        <tr>
                            <td>简略标题</td>
                            <td class="widt"><input type="text" name="Fstit" value="" maxlength="16"/></td>
                            <td id="classTishi">新闻的二级标题在4~16字之间</td>
                        </tr>
                        <tr>
                            <td>文章来源</td>
                            <td class="widt email"><input type="text" name="Fsource" value="" maxlength="16" data-rule="文章来源:required;length[4~16]" data-target="#functTishi"/></td>
                            <td id="functTishi">请注明新闻的来源</td>
                        </tr>
                        <tr>
                            <td>发布时间</td>
                            <td class="widt"><input type="text" name="FaddTime" value="" maxlength="32"/></td>
                            <td id="functTishi">新闻的发布时间，不填写默认当前时间</td>
                        </tr>
                        <tr>
                            <td>作者</td>
                            <td class="email"><input type="text" name="Fname" value="" maxlength="16" data-rule="作者:required;length[2~16]" data-target="#wayTishi"/></td>
                            <td id="wayTishi">注明新闻的作者或编辑</td>
                        </tr>
                        <tr>
                            <td>文章摘要</td>
                            <td class="widt email"><input type="text" id="ffunct" name="Fabstract" value="" maxlength="32" data-rule="文章摘要:required;length[4~16]" data-target="#absTishi"/></td>
                            <td id="absTishi">文章的摘要，导语</td>
                        </tr>
                        <tr>
                            <td>关键字</td>
                            <td class="widt"><input type="text" id="ffunct" name="Fkeyword" value="" maxlength="32"/></td>
                            <td>关键字会影响新闻的搜索和排名</td>
                        </tr>
                        <tr>
                            <td>设置缩略图</td>
                            <td class="widt"><input type="file" name="Fimg" value=""/></td>
                            <td>图片大小不能超过2M</td>
                        </tr>
                        <tr class="file_edit">
                            <td>文章正文</td>
                            <td class="widt email" colspan="2">
                                <script type="text/javascript" src="<?php echo HTTP_EXTENDS; ?>ueditor1/ueditor.config.js"></script>
                                <!-- 编辑器源码文件 -->
                                <script type="text/javascript" src="<?php echo HTTP_EXTENDS; ?>ueditor1/ueditor.all.js"></script>
                                <!-- 实例化编辑器 -->
                                <script id="edit" name="Fcontent" type="text/plain"></script>
                                <!-- 配置文件 -->
                            </td>
                        </tr>
                        <tr>
                            <td>排序</td>
                            <td class="sort"><input type="text"  name="Fsort" value="1" maxlength="2" data-rule="排序:required;integer;length[1~999]" data-target="#sort"/></td>
                            <td id="sort">新闻的发布先后顺序</td>
                        </tr>
                        <tr>
                            <td>文章状态</td>
                            <td>
                                <select name="Fstatus" class="show">
                                    <option value="0">0</option>                           
                                    <option value="1">1</option>
                                </select>
                            </td>
                            <td>文章的发布状态，0=审核不通过，1=审核通过</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td class="subbtn" colspan="2">
                                <input class="ok" type="submit" name="ok" value="确认提交">
                                <a href="index.php?C=Global&A=newsInfo&way=S" class="cancel">返回</a>
                            </td>
                        </tr>
                    </table>
                </form>
            </dd>
        </dl>
    </div>
</div>
<?php include PATH_VIEWS . 'common/footer.php'; ?>
<script>
    var ue = UE.getEditor('edit', {
        emotionLocalization: true,
        maximumWords: 1000,
        initialFrameWidth: 1000,
        initialFrameHeight: 200,
    });

</script>